<!DOCTYPE html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  
 </head>
 <body>
  <script>
var mycars = ['宝马','奔驰','奇瑞','标致','捷达'];
var cars = mycars.join("|");    		//用|连接
document.write(cars);

  </script>
 </body>
</html>
